package com.lsp.server.product.mapper;

import com.lsp.server.product.domain.po.ProductAttrValues;
import com.lsp.server.product.domain.po.ProductType;
import com.lsp.server.product.domain.vo.AttrVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName TypeMapper
 * @Description 商品分类mapper层
 * @Author Mr Hao
 * @Date 2021/11/21 13:39
 */
@Mapper
public interface TypeMapper {

    void addType(ProductType form);

    List<ProductType> queryAllData();

    @Select("select * from product_attr where aid=#{id}")
    List<AttrVo> getAttrValues(Integer id);

    @Select("select * from product_attr_sku where aid=#{id}")
    List<ProductAttrValues> queryAllValues(Integer id);

    @Select("SELECT * FROM product_type")
    List<ProductType> refresh();
}
